package com.itheima.health.dao;

import com.itheima.health.pojo.Order;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.Date;
import java.util.List;


@Mapper
public interface OrderDao {

    void save(@Param("order") Order order);

    Order selectByDateAndSetmealIdAndMemberId(@Param("orderDate") Date orderDate, @Param("setmealId") Integer setmealId, @Param("memberId") Integer memberId);

    Order selectById(@Param("id") Integer id);

    List<Order> selectBySetmealId(@Param("setmealId") Integer setmealId);

    Integer selectCountByDateAndOrderStatus(@Param("beginDate") LocalDate beginDate, @Param("orderStatus") String orderStatus);

    List<Order> selectAll();
}
